how to make an event handler for keypress in matlab